package com.xiaren.service;

import com.xiaren.config.DemoCacheConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description: TODO
 * @ClassName: DemoService
 * @Auther: Administrator
 * @Date: 2018/12/14 13:53
 * @Version: 0.0.1
 */

@Slf4j
@Service
public class DemoService2 {

    @Autowired
    BookingService bookingService;



    @Transactional
    public void transactionMySqlDemo(){
        System.out.println("另一个类中的事务测试");
        System.out.println("lin");
        bookingService.book("555555555555555555555错误");
    }



}
